<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Get (part of) query string</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="httpquerystring.construct.html">HttpQueryString::__construct</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="httpquerystring.mod.html">HttpQueryString::mod</a></div>
 <div class="up"><a href="class.httpquerystring.html">HttpQueryString</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="httpquerystring.get" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">HttpQueryString::get</h1>
  <p class="verinfo">(PECL pecl_http &gt;= 0.22.0)</p><p class="refpurpose"><span class="refname">HttpQueryString::get</span> &mdash; <span class="dc-title">Get (part of) query string</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-httpquerystring.get-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <span class="methodname"><strong>HttpQueryString::get</strong></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>
   [, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$type</code><span class="initializer"> = 0</span></span>
   [, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$defval</code><span class="initializer"> = <strong><code>NULL</code></strong></span></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$delete</code><span class="initializer"> = false</span></span>
  ]]]] )</div>


  <p class="para rdfs-comment">
   Get (part of) the query string.
  </p>
  <p class="para">
   The type parameter is either one of the <a href="class.httpquerystring.html#http.httpquerystring.constants" class="link">HttpQueryString::TYPE_* constants</a> or a type abbreviation like
   &quot;b&quot; for bool, &quot;i&quot; for int, &quot;f&quot; for float, &quot;s&quot; for string, &quot;a&quot; 
   for array and &quot;o&quot; for a stdClass object.
  </p>

 </div>

 <div class="refsect1 parameters" id="refsect1-httpquerystring.get-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">key</code></em></dt>

     <dd>

      <p class="para">
       key of the query string param to retrieve
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">type</code></em></dt>

     <dd>

      <p class="para">
       which variable type to enforce
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">defval</code></em></dt>

     <dd>

      <p class="para">
       default value if key does not exist
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">delete</code></em></dt>

     <dd>

      <p class="para">
       whether to remove the key/value pair from the query string
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-httpquerystring.get-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns the value of the query string param or the whole query string if no key was specified on success or defval if key does not exist.
  </p>
 </div>


 


 


 


 


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="httpquerystring.construct.html">HttpQueryString::__construct</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="httpquerystring.mod.html">HttpQueryString::mod</a></div>
 <div class="up"><a href="class.httpquerystring.html">HttpQueryString</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
